package com.lagou;

import com.lagou.bean.MyMethodConsumer;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.io.IOException;


public class AnnotationConsumerMain {
	public static void main(String[] args) throws IOException {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
		context.start();
		MyMethodConsumer service = context.getBean(MyMethodConsumer.class);
		service.consume();
	}

	@Configuration
	@PropertySource("classpath:/dubbo-consumer.properties")
	@ComponentScan("com.lagou.bean")
	@EnableDubbo
	static class ConsumerConfiguration {

	}
}
